<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Checks if the provided string is already in the specified normalization
   form.</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="class.normalizer.html">Normalizer</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="normalizer.normalize.html">Normalizer::normalize</a></div>
 <div class="up"><a href="class.normalizer.html">Normalizer</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="normalizer.isnormalized" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Normalizer::isNormalized</h1>
  <h1 class="refname">normalizer_is_normalized</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">Normalizer::isNormalized</span> -- <span class="refname">normalizer_is_normalized</span> &mdash; <span class="dc-title">
   Checks if the provided string is already in the specified normalization
   form.
  </span></p>

 </div>
 <div class="refsect1 description" id="refsect1-normalizer.isnormalized-description">
  <h3 class="title">说明</h3>
  <p class="para">面向对象风格</p>
   <div class="methodsynopsis dc-description">
    <span class="modifier">public</span>
    <span class="modifier">static</span>
    <span class="type">bool</span> 
    <span class="methodname"><strong>Normalizer::isNormalized</strong></span>
     ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$input</code></span>
    [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$form</code><span class="initializer"> = Normalizer::FORM_C</span></span>
   ] )</div>

  <p class="para rdfs-comment">过程化风格</p>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> 
   <span class="methodname"><strong>normalizer_is_normalized</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$input</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$form</code><span class="initializer"> = Normalizer::FORM_C</span></span>
  ] )</div>

  <p class="para rdfs-comment">
   Checks if the provided string is already in the specified normalization
   form.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-normalizer.isnormalized-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">input</code></em></dt>

     <dd>

      <p class="para">The input string to normalize</p>
     </dd>

    
    
     <dt>
<em><code class="parameter">form</code></em></dt>

     <dd>

      <p class="para">
       One of the normalization forms.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>



 <div class="refsect1 returnvalues" id="refsect1-normalizer.isnormalized-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para"><strong><code>TRUE</code></strong> if normalized, <strong><code>FALSE</code></strong> otherwise or if there an error</p>
 </div>


 <div class="refsect1 examples" id="refsect1-normalizer.isnormalized-examples">
  <h3 class="title">范例</h3>
  <div class="example" id="example-2502">
   <p><strong>Example #1 
    <span class="function"><strong>normalizer_is_normalized()</strong></span> example
   </strong></p>
   <div class="example-contents">
    <div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$char_A_ring&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"\xC3\x85"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;'LATIN&nbsp;CAPITAL&nbsp;LETTER&nbsp;A&nbsp;WITH&nbsp;RING&nbsp;ABOVE'&nbsp;(U+00C5)<br /></span><span style="color: #0000BB">$char_combining_ring_above&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"\xCC\x8A"</span><span style="color: #007700">;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;'COMBINING&nbsp;RING&nbsp;ABOVE'&nbsp;(U+030A)<br />&nbsp;<br /></span><span style="color: #0000BB">$char_orig&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'A'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$char_combining_ring_above</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$char_norm&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">normalizer_normalize</span><span style="color: #007700">(&nbsp;</span><span style="color: #DD0000">'A'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$char_combining_ring_above</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">Normalizer</span><span style="color: #007700">::</span><span style="color: #0000BB">FORM_C&nbsp;</span><span style="color: #007700">);<br />&nbsp;<br />echo&nbsp;(&nbsp;</span><span style="color: #0000BB">normalizer_is_normalized</span><span style="color: #007700">(</span><span style="color: #0000BB">$char_orig</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">Normalizer</span><span style="color: #007700">::</span><span style="color: #0000BB">FORM_C</span><span style="color: #007700">)&nbsp;)&nbsp;?&nbsp;</span><span style="color: #DD0000">"normalized"&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #DD0000">"not&nbsp;normalized"</span><span style="color: #007700">;<br />echo&nbsp;</span><span style="color: #DD0000">';&nbsp;'</span><span style="color: #007700">;<br />echo&nbsp;(&nbsp;</span><span style="color: #0000BB">normalizer_is_normalized</span><span style="color: #007700">(</span><span style="color: #0000BB">$char_norm</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">Normalizer</span><span style="color: #007700">::</span><span style="color: #0000BB">FORM_C</span><span style="color: #007700">)&nbsp;)&nbsp;?&nbsp;</span><span style="color: #DD0000">"normalized"&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #DD0000">"not&nbsp;normalized"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

  </div>
  <div class="example" id="example-2503">
   <p><strong>Example #2 OO example</strong></p>
   <div class="example-contents">
    <div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$char_A_ring&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"\xC3\x85"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;'LATIN&nbsp;CAPITAL&nbsp;LETTER&nbsp;A&nbsp;WITH&nbsp;RING&nbsp;ABOVE'&nbsp;(U+00C5)<br /></span><span style="color: #0000BB">$char_combining_ring_above&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"\xCC\x8A"</span><span style="color: #007700">;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;'COMBINING&nbsp;RING&nbsp;ABOVE'&nbsp;(U+030A)<br />&nbsp;<br /></span><span style="color: #0000BB">$char_orig&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'A'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$char_combining_ring_above</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$char_norm&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">Normalizer</span><span style="color: #007700">::</span><span style="color: #0000BB">normalize</span><span style="color: #007700">(&nbsp;</span><span style="color: #DD0000">'A'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$char_combining_ring_above</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">Normalizer</span><span style="color: #007700">::</span><span style="color: #0000BB">FORM_C&nbsp;</span><span style="color: #007700">);<br />&nbsp;<br />echo&nbsp;(&nbsp;</span><span style="color: #0000BB">Normalizer</span><span style="color: #007700">::</span><span style="color: #0000BB">isNormalized</span><span style="color: #007700">(</span><span style="color: #0000BB">$char_orig</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">Normalizer</span><span style="color: #007700">::</span><span style="color: #0000BB">FORM_C</span><span style="color: #007700">)&nbsp;)&nbsp;?&nbsp;</span><span style="color: #DD0000">"normalized"&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #DD0000">"not&nbsp;normalized"</span><span style="color: #007700">;<br />echo&nbsp;</span><span style="color: #DD0000">';&nbsp;'</span><span style="color: #007700">;<br />echo&nbsp;(&nbsp;</span><span style="color: #0000BB">Normalizer</span><span style="color: #007700">::</span><span style="color: #0000BB">isNormalized</span><span style="color: #007700">(</span><span style="color: #0000BB">$char_norm</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">Normalizer</span><span style="color: #007700">::</span><span style="color: #0000BB">FORM_C</span><span style="color: #007700">)&nbsp;)&nbsp;?&nbsp;</span><span style="color: #DD0000">"normalized"&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #DD0000">"not&nbsp;normalized"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

  </div>
  <p class="para">以上例程会输出：</p>
  <div class="example-contents screen">
   <div class="cdata"><pre>
not normalized; normalized
</pre></div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-normalizer.isnormalized-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="normalizer.normalize.html" class="function" rel="rdfs-seeAlso">normalizer_normalize()</a> - Normalizes the input provided and returns the normalized string</span></li>
   </ul>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="class.normalizer.html">Normalizer</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="normalizer.normalize.html">Normalizer::normalize</a></div>
 <div class="up"><a href="class.normalizer.html">Normalizer</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
